extends Node
class_name Tasks

var taskQueue = []

func getTask():
	if len(taskQueue) == 0: return null
	return taskQueue.pop_front()

func getFindFoodTask() -> Task:
	var task = Task.new()
	task.addfoundFoodEatTask()
	return task

func addTask(taskType: Task.TaskType, item: Item) -> void:
	var newTask = Task.new()
	if taskType == Task.TaskType.harvest:
		newTask.addHarvestTask(item)
		taskQueue.append(newTask)